Chi-squared test for outlier:
Description:
- Performs a chi squared test for detection of one outlier in a vector.
Usage:
-
chisq.out.test(x, variance=var(x), opposite = FALSE)
Arguments:
-
x: a numeric vector for data values.
Variance: known variance of population. if not given, estimator from sample is taken, but there is not so much sense in such test (it is similar to z-scores)
Opposite: a logical indicating whether you want to check not the value with largest difference from the mean, but opposite (lowest, if most suspicious is highest etc.).
Details:
This function performs a simple test for one outlier, based on chisquared distribution of squared differences between data and sample mean. It assumes known variance of population. It is rather not recommended today for routine use, because several more powerful tests are implemented.
Examples
-
set.seed(1234)
-
x = rnorm(10)
-
chisq.out.test(x)
-
chisq.out.test(x,opposite=TRUE)
Note:
-
This test is known to reject only extreme outliers, if no known variance is specified.
Useful Files
Users Joined
Warning: Undefined variable $getUser in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Trying to access array offset on value of type null in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Undefined variable $getUser in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Trying to access array offset on value of type null in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Undefined variable $getUser in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Trying to access array offset on value of type null in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Undefined variable $getUser in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Trying to access array offset on value of type null in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Undefined variable $getUser in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56
Warning: Trying to access array offset on value of type null in /home/wolf.engineershub.in/public_html/engineershub/engineershub/themes/ehthree/layout/right-sidebar.phtml on line 56